<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<div class="col-xs-12">
	<form:form commandName="coordinateFilter" cssClass="form-horizontal" role="form">
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="problemName">问题名称</label>
			<div class="col-sm-4">
				<input type="text" name="problemName" id="problemName" class="form-control" />
			</div>

		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="industryId">指标名称</label>
			<div class="col-sm-4">
				<select name="industryId" id="industryId" class="form-control" >
					<option value="">--请选择--</option>
					<c:forEach items="${industries }" var="industries">
						<option value="${industries.sysId}">${industries.indicatorName}</option>
					</c:forEach>
				</select>
			</div>
			<label class="col-sm-2 control-label no-padding-right" for="industryDate">指标时间</label>
			<div class="col-sm-4">
				<input type="text" name="industryDate" id="industryDate" placeholder="点击选择"
					   class="form-control date-picker1" />
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="baseInfo">基本情况</label>
			<div class="col-sm-10">
				<textarea rows="2" id="baseInfo" name="baseInfo" class="form-control" ></textarea>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="helpInfo">需协调事项</label>
			<div class="col-sm-10">
				<textarea id="helpInfo" name="helpInfo" rows="2" class="form-control" ></textarea>
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="groupCode_filter">督查组</label>
			<div class="col-sm-4">
				<select name="groupCode" id="groupCode_filter"
						class="form-control <%--departments--%>" <%--multiple="multiple"--%> >
					<option value="">--请选择--</option>
					<c:forEach items="${supervisionList }" var="supervisionList">
						<option value="${supervisionList.sysId}">${supervisionList.deptName}</option>
					</c:forEach>
				</select>
			</div>
			<label class="col-sm-2 control-label no-padding-right" for="deptId_filter">责任单位</label>
			<div class="col-sm-4">
				<select name="deptId" id="deptId_filter" class="form-control " >
					<option value="">--请选择--</option>
					<c:forEach items="${resDepts }" var="resDepts">
						<option value="${resDepts.sysId}">${resDepts.deptName}</option>
					</c:forEach>
				</select>
			</div>
		</div>

		<div class="form-group">

			<label class="col-sm-2 control-label no-padding-right" for="inspectors_filter">督查组成员</label>
			<div class="col-sm-4">
				<input type="text" name="inspectors" id="inspectors_filter" class="form-control" />
			</div>
			<label class="col-sm-2 control-label no-padding-right" for="resUser_filter">责任人</label>
			<div class="col-sm-4">
				<input type="text" name="resUser" id="resUser_filter" class="form-control" />
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="phones_filter">督查成员手机号</label>
			<div class="col-sm-4">
				<input type="text" name="phones" id="phones_filter" class="form-control" />
			</div>
			<label class="col-sm-2 control-label no-padding-right" for="resPhone_filter">责任人手机号</label>
			<div class="col-sm-4">
				<input type="text" name="resPhone" id="resPhone_filter" class="form-control" />
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="userName">上报人</label>
			<div class="col-sm-4">
				<input type="text" id="userName" class="form-control" value="${bnpUser.name}" />
			</div>
			<label class="col-sm-2 control-label no-padding-right" for="source">来源</label>
			<div class="col-sm-4">
				<input type="text" name="source" id="source" class="form-control" />
			</div>
		</div>
		<%--<input type="text" id="sysId" value="${coordinateFilter.sysId}" hidden/>--%>
		<%--<form:hidden path="sysId"/>--%>
		<%--<form:hidden path="maxVal"/>
        <form:hidden path="minVal"/> --%>
	</form:form>
</div>


<script>
    $(function () {
        // $("#deptId_filter").change(function () {
        //     var deptId = $("#deptId_filter").val();
        //     $.ajax({
        //         url: "/jobmanages/queryResUserByDeptId",
        //         type: "GET",
        //         dataType: "json", //返回数据形式为json
        //         contentType: 'application/json;charset=UTF-8',
        //         async: true,
        //         data: {"deptId": deptId},
        //         success: function (res) {
        //             if(res != null){
        //                 $("#resUser_filter").val(res.name);
        //                 $("#resPhone_filter").val(res.mobile);
        //             }else{
        //                 $("#resUser_filter").val("");
        //                 $("#resPhone_filter").val("");
		// 			}
        //         }
        //     });
        // });
		//
        // $("#groupCode_filter").change(function () {
        //     var groupCode = $("#groupCode_filter").val();
        //     $.ajax({
        //         url: "/jobmanages/querySupervisionUserByDeptId",
        //         type: "GET",
        //         dataType: "json", //返回数据形式为json
        //         contentType: 'application/json;charset=UTF-8',
        //         async: true,
        //         data: {"deptId": groupCode},
        //         success: function (res) {
        //             debugger;
        //             if(res != null){
        //                 $("#inspectors_filter").val(res.name);
        //                 $("#phones_filter").val(res.mobile);
        //             }else{
        //                 $("#resUser_filter").val("");
        //                 $("#resPhone_filter").val("");
		// 			}
        //         }
        //     });
        // });

        $(".date-picker1").datepicker({
            inline: true,
            format: "yyyymm",
            autoclose: true,
            todayHighlight: true,
            language: 'cn'
        }).next().on(ace.click_event, function () {
            $(this).prev().focus();
        });
    })

</script>
